package dao;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import vo.OrderListVO;
import vo.SellerVO;

public class SellerDAO {
	private SqlMapClientTemplate client;
	
	public void setSqlMapClientTemplate(SqlMapClientTemplate client) {
		this.client = client;
	}
	
	public void insertStore(SellerVO selvo) {
		client.insert("seller.SellerInsert", selvo);
	}
	public int deleteStoreById(String member_id){
		return  client.delete("seller.DeleteSeller" , member_id);
	}
	public List selectAllStore(){
		return client.queryForList("seller.SearchAllSeller");
	}
	
	public SellerVO selectStoreById(String member_id){
		return (SellerVO)client.queryForObject("seller.SearchSellerId", member_id);
	}
	
	public void updateStore(SellerVO svo) {
		client.update("seller.UpdateSeller" , svo);
	}
	public ArrayList<OrderListVO> SearchAllPriceById(String member_id){
		return  ( ArrayList<OrderListVO>)client.queryForList ("seller.SearchAllPriceById", member_id);
	}
	public int SearchAllPriceByIdSum(String member_id){
		return  (Integer)client.queryForObject ("seller.SearchAllPriceByIdSum", member_id);
	}
	
	public ArrayList<OrderListVO> SearchSeasonPriceById(HashMap hMap){
		return  ( ArrayList<OrderListVO>)client.queryForList ("seller.SearchSeasonPriceById", hMap);
	}
	public int selectTotalPriceDateSum(HashMap hMap) {
		return  (Integer)client.queryForObject("seller.selectTotalPriceDateSum", hMap);
	}
}
